Environment cleanup

Leave it up to OTP instead of trying to mimic the behavior (and only partially at that)