Modified code to use Command struct in prep for pipes/redirection.