refactory the Mod loader