added urlencoding of hash and a main.c to tie everything together, updated a few other files to reflect these changes