Fixed all warnings, Included time in the srand