Lots of changes.
Added back the old TextUI class.