Code for Cookie mod (ModJam entry)