Work on Rulebuilder

- crisp relations
- some refactoring & cleanup