Cleaned up random number generator a bit (comments and code)