> just a warning...
> this header / functions needs massive refactoring..

Indeed. Hostograms are a chapter of their own.