IMGAPI-39: refactor, forgot toinclude in last commit
IMGAPI-39: refactor, forgot toinclude in last commit

numericillustration/sdc-imgapi,joyent/sdc-imgapi,joyent/sdc-imgapi,numericillustration/sdc-imgapi,joyent/sdc-imgapi,numericillustration/sdc-imgapi