Add comments to various parts of the `/sync` handler.