Removes quite a bit of dead code