fix removeOverlapingIndecies
cleanup and small improvement to trie.js