Add command processor

This PR introduces the command processor.
Targets #236 and #219.
Visibility for this and the two above missing.