Changed the the input handling works, and refactor a bunch of stuff in game