Make loader factory customizable