Optimize resources.