Minor cleanup (2.5 compat, mostly)