This is probably overkill but most of the code is needed to validate the command string. My thought was that this could then be used in the delegation and invocation structs to provide a stronger type. The Command struct itself is a bit more convenient with segments represented by []string but this might need to be changed to simply string to simplify IPLD encoding/decoding