Cleaned up the code a bit, and added a “CommandsCommand” that encapsulates a bunch of commands and uses its input to select which one to execute.