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.
Merge pull request #46 from klickagent/patch-1

Syntax corrections (for proper minification)