cleaned up code by moving what were functions put in html into the game js file