Some command logic moved to util functions (this should be done for every non tribial command)
improved term tab completition
implemented wraper for term.echo and term.error for language support (yes, everything in the terminal can now be manipulated with language
State can be loaded with hg.load.state (from confing and server-side js).