Adds single-level Include to relational query. Many small fixes/improvem...

...ents to query framework.