Added comments to activity for clarification.