Implemented Command.toBytes() and Command.fromBytes().