refactored Huffman object members into CodeTree trait