Improved dependency loading