Removed trailing commas and unused duplicate variables