Documentation added for some functions
Random number generation function added