Changed c++ flags and implemented some random number generation functions
mean and std util functions added