Refactored loading of external data