Added perturbation factor. Fixes and improvements.