Fix rotation bug. Rename some constants
Add key event handling