Refactored out flags to allow for multiple commands and actions