Merge with upstream branch

All of my changes have been fed cleanly to upstream. It now has all of the changes we have been running locally.