Various minor API changes (deprecated Pair/Triple and replaced usage by more descriptively named classes); added Trie classes