Added David's fixes
Added more of David's fixes