Trie copy fix
Algo files and tests