latest round of changes pulled in from master.