Updated Stage2 binaryfit code