Fixed unit test of orcid api, small refactoring