Function `fAvgStartStop()` is very slow and inefficient. The `for` loops should be replaced (see also issue #6) and a faster algorithm implemented.