Modular trie based router