Separate command line building and sanitizing into its own class.