Update ModuleLoader to the new API