Ian suggested these changes in his review and I made them, but I pushed the old version of the patch.