Added function purpose comments.