Heaps of little fixes and changes to mostly get this through jshint.
Removed the scrolling code when in physical mode. Added 'manual-scroll' event when the user deliberately scrolls the contents on the terminal.