Cleanup of the orientation hack