Added comments to document thought flow