Initialization: move key expansion out to operate on all sources and not just environment variables