fixed bugs caused by currentSearchTerm global var

& removed unneeded line

currentSearchTerm is no longer updated, but it was being used to
get search term and check whether things had changed.

fixed annoying bug where cursor moved to end whenever field
changed. This was due to the hash functionality that was testing
a change in hash against the currentSearchTerm global var that is
no longer used or updated and thus was always empty, causing the
program to always set the typeahead field to the hash value, moving
cursor to end of line.

also fixed problems with the 'more' button caused by same issue.