Sporadic changes

Lots of bug fixing and rewriting and debug code. Since I'm the only
person working on this I'm allowed to do this, right?