code cleanup and review of the social sharing helper