fix trailing commas and the likes