Code cleanup, typo fixes.
Merge pull request #1 from biot/fixes

Code cleanup, typo fixes.
Coding style cleanup.
Fix Home and End keys, and add ctrl-l.