Refactoring

- Removed 'namespace' arg, it was not used at all and was a bit annoying. We should add it back when we really need it.
- Enhanced evaluate_query interface (and a few others).
- Removed query traversal boilerplate.