Code for final version of Oc Mod paper