Refactoring completed, working example,closes #133

Hard to prepare unit tests, maybe with Don Corleone