Merge 1.5.x changes

Also, pick up the test refactoring from master.