Loader refactoring part 2