Improvements & fixes for HCF backend: need to discuss before merge