make _perform_actions available for other commands and add better handling of command-line args for modularity