Major cleanup of resources.