fix the bug that inserting a new line before cursor will set the cursor to the line after new line
inplement all the methods in SimpleTextEditor interface and removed some of my own methods
complete initial and middle