Additional fix #1 to main file, adding uniform distribution random generator.