Add 2D rotation code.
Refactored character control.