Integrate David's changes