Query Recommendation support

Query recommendation support and other changes