Cleanup: terminate all statements with semicolons, remove unnecessary semicolons, remove unused variables, add hasOwnProperty checks in 'for x in y' loops.