Added the new feature to manage query history.
Merge branch 'query_history'