Finished: Logical and code problems.

For the huffman code I used a solution found on github for creating the
tree. Without it I probably wouldv'e written something way more
complicated.