Switch all instances of setAPIKey to use shared function so we ensure that API version and info is always set