Move all the binary trie functions to the common header file.