remove trailing commas, add missing fields