update documentation, clean code, add value to modulationRate_internal if avoidEvents is false, make filter parameters final to avoid compilation waring.