Refactored some code and added the ability to move the selector left and right