[WIP] Refactor command model

Doing some followup refactoring on the command shorthands PR and adding some additional unit tests. Some of the methods needed to be broken up further so they were more testable. Will be giving `parseArgs` the same treatment as well.