added makefile, separated into modules, fixed a mistake on string termination in trie.decode