Update ivs app to use new config file convention.

Also factored environment context detection and associated call points.