Refactored loader.