Completed trie loading and unload functions. No memory leaks detected.