Working detached rulesets draft with enabled unit tests. Most cases work,
but the whole thing needs some more testing and clean up. #186