Refactor building of environment specific configs