Smaller changes
Smaller fixes while working with environment variables.
Added platform dependent test