Sort methods in trie.js by name
Rename Trie's inner trie variable to this.trie to prevent scope clashes
Fix an issue with clashing variables in the tests