Fix cursor blinking
Make caret functions stateless
Correct up and down caret movements
Implement expanding caret positions to word on dblclick
Some refactoring in caret.js
Handle keypresses
Fix order of arguments when calling delete_() in typing