reformatted functions to have params on the same line as function name
moved generic functions to utils.lisp and also used recursive inner functions for sort and pack
huffman encoding seems to work