generalize and clean up the mods processor just a tiny bit