Loader refactor