remove a bunch of dead code