Extracting and scoping keystone.initAPI