Remove outdated environment APIs

Since the introduction of the immutable envs the old APIs can be safely
removed as the use is not encouraged and can lead to confusing
behaviour.