cleanup of dead code and removal of pdb