Proper scoping and treatment of environment variables cf. #103