Added feature residualization counter and edge-case parameter settings.