Added command-line flags to main method.