hcalc integration and bugfixes