Removed a bunch of dead code