Changed the moveLeft and moveRight functions to be a single move function