improved initial caret position from mouse
fixed idention issues with unicode
other misc improvements