It should be possible to refactor the code for both flags from the cli and variable strings from the cli to go down a common path.