Improved random number generator calls and overall commenting