Cleaner reimplementation of _ENV 2/2

Signed-off-by: katlogic <git@git.git>