SemiLinear fit fix and test clean up