Macro to create loader class