typos
todos
simplified display of cursor and selection