No more global variables in search.
Added 'compress_trie()' function.