Implemented Cursor movement and boundaries