Moved all MFR code inside the isModLoaded tag