Algorithm ready

The main huffman algorithm is now working, ready for further tests.