Partially MVC-ified code.
Moved mouse code to CubedMouseHandler.