add Max macros
remove printf
some changes
finish generating of huffman codes