remove unused vars and clean up indentation
remove unused id function
remove extra comma