PUBAPI-458: Refactoring. Same code for 6.5 & 7.0 packages.
PUBAPI-458: Refactoring. Same code for 6.5 & 7.0 packages.

arekinath/sdc-cloudapi,misterbisson/sdc-cloudapi,misterbisson/sdc-cloudapi,KrisShannon/sdc-cloudapi,joyent/sdc-cloudapi,arekinath/sdc-cloudapi,joyent/sdc-cloudapi,KrisShannon/sdc-cloudapi