Visual query builder

Still working on:

* Docstrings/better variable names
* Precompute compatibility
* Adding a setting to disable pycode altogether
should the directive and model have the same name? Kind of confusing.