Restructured run method to make it more readable in cases where there are a large number of arguments passed as flags.