Nigel's clean trie.h