Got trie working, bit of spaghetti code at the moment. Cleanup time!

Wrote the trie functions for the program and got those working. Verified
code works without leaking memory using valgrind so unload does it's
job. Now, time to cleanup the code and split it into a final submit
using the tries, while keeping a version using the hash tables for my
own edification.