Improved use of browser history for search (back and forward button support). Needs cleanup