Cleaned up a bunch of dead code