Improvements to simple environment random conf generation

1) Added default value
2) Moved random generation out of the loop