Some minor code cleanup, added detection for left arrow key