Created loop in parallel huffman function to build

tree along with some minor changes and addition.
This all still needs to be tested.