Switch to tries in command handlers
Remove unused hash table code