Refactoring of CLI-handling

Due to the fact that the current CLI handling functions are very prototypical, some of them hold a very high complexity a refactoring is therefore appropriate.

In the course of this it is worthwhile to deal intensively with gRPC and protobuf, so that perhaps simpler and more intelligent solutions can be found.