Add comments to common reference extraction code