Integrate David's changes.