Using source keys properly, moving trie functions about.