tidied some bits up
caret positioning on return and backspace