Simplify huff.c and make it more readable