Basic keyboard input functions created

can now check keys pressed from game, moved main loop to game, general
clean ups