Removing unneeded classes and resources.