Changes to selective mods, changed structure and added code to handle reordered mods