Optimize dependecies.