Space/tab formatting stupidness - changed tabs to spaces
Moved event handling into separate function.
Some code organizing.
Added a small movable rectangle, move with arrow keys. Handles multiple keys down appropriately, i.e. can move diagonally.