Didn't touch comments where it wasn't obvious that the code adhered to the newer standard. Backport of ac77c55b from master