Minor fixes in query editor and enhancements for search and query.