updated querying to allow for map/reduced views with consistency. Also allow for better return documents in queries.