Add stat hook

Remove trailing commas in objects and array lists