minor bug fixes to keystone v3 api and code cleanup