Updated version for publication.