Cleanup of dead code