Add better comments to explain code