Add comments to all functions (to help me understand it better).