Incorporating PR notes from @gerundt.