Remove a bunch of dead code