documenting the api and cleaning it up to externalize most everything into the query element config.