Refactored directory load