HBM code modernization