Optimize the dependencies