bug fixes and cleanup

also:
* better showing current directory
* blocking mouse point the caret on middle of text