support for multi-environment configs, unit tests updated
updated version
fixed merge conflicts from upstream merge