Replaced my terrible sanitizing code with a snippet by David Manura (thanks)
terminal screen now automatically clears when full.  This didn't work before.  And no, I'm not doing seamless scrolling, but if someone wants to try that, go ahead.