Plugin passes JSHint

Hello. First of all thank you for good job. I use it and like the way this is working.

Code convention of my company is strict so I had to make your script "JSHintable". I did a bit: added symbols such { ; and renamed variables because they were already used. At the end I moved inner functions, because "Inner functions should be listed at the top of the outer function"

Hope you will find this commit useful.