Syntax corrections (for proper minification)

My changes are only syntax corrections, to allow proper minification by common tools. There were mainly semicolons missing, but I also had to change the for loop on line 2113.