massive cleanup of dead code.
more cleanup.