A lot of tweekings. huffman tree finished and working. Maybe some optimisations to do later but won't gain a lot.