Added left and right buttons and motion logic