Slope Subtraction

Generic slope subtraction depending on the amount of data.