fix performance problem of extrag_tags
use prefix dict instead of trie, add a command line interface, and a few small improvements