RR: minor refactors/clean up from @pld's review