Javascript huffman code visualizer