Made quite a few changes to MOD.