Refactor the ugly parts of options modifiers