Simplify and add support for env var prefix