Add basic environment support

Good find! Looks safe to me.