This commit only does code movement, and does not clean up after itself. As such, it will break compilation. I'm separating it for ease of review.