Merge secant code into master