Autoconfiguration for cloud hosting environments, OpenShift support

Yeah, PS convention is to declare variables where they're used. Makes everything a lot more straightforward.