Preliminary version of fix/refactoring to get rid of the object creation/destruction spam that was overwhelming the garbage collector. As a side benefit, it's less hard on your system, in general. The formatting needs serious work.