Fix compilation derp, and clean up rotation helper.