Updated H-P Xcal code