Fixed some bugs, added the prototype of the moveLeft() and moveRight() function