Factor out nextLevel method into a helper thing.
Split up query panel template.
Refactor ObjectQueryCtrl into gn-query-panel-layer.