Added the implementation of the trie methods. It is not tested (that will be the next step)