Set the TERM env varibale so that special key bindings (such as arrow keys) work as expected in gnome terminal.
Cleaned up some white space and comments