Added options to remember cursor position