Various fixes and improvements.
Lots of terminal stuff.
Oops checked in broken hyde.