Progress on trie

This is also an interim commit. The trie shapens but I can't continue coding
the next few days, so I make the staging area clean for now.