1. Changed removeOutliers function from a bcp-dependent package to a simple function that checks the slope between two points along a curve; points from which a strongly positive slope originates are considered outliers.

2. Start of fit function optimization; for loops to be replaced by apply functions
Optimized fit + outlier detection functions