cleaner way of setting config when resolving location,
not pulling in everything, and setting user etc correctly, and tests