Refactor: add helper method to move cursor to end.