Moved level logic into it's own file and refectored the main.js file.
Added keydown event handler.