cleaned up hufftree code
more cleanup