Refactored things around a bit in the CLI portion