Use only one form of per-environment configuration

:construction: 

This is a reprise of #298, rebased on the current master branch.