Synchronized branch with trunk, plus a bug fix. I will be bringing over the changes from David's branch - so his work won't be lost.