Simplified env detection closure
Code standards update to classes
Simplified if statement