adds Trie functions, changes to coffeescript