Cleanup of dead code and comments