Small cleanup
Fix terminal after a reload
Add consistant commandline history
Add quit command
Small fixes and code cleanup