Improve dependencies build