Removed a bunch of legacy code and cleaned up formatting a bit.
Removed more legacy code.