Refactored according to PR review https://github.com/jclouds/jclouds/pull/497.