added latestQuery global variable for navigateHome; remembers latestQuery post save via the URL parameter