aggregated small commits

603137c r=cmr
fe10db2 r=bstrie