Update comments to explain functionality