CLOUDIFY-2073 add comments and rename some methods