support for multi-environment configs, unit tests updated