Changed in the input handling code to allow the game to run smoother, added the running boolean which will help the game run better.