Fixed updated of cursor line
Refactored cursor movement
Added get_line_at method