Fixed random whole number method to create an even sample distribution, and added tests