adapting the JS to pass on JSHint, minor changes

Just did some minor changes to adapt the JS to pass ok on JSHint check. 
I´m integrating this plugin on a project of mine and it´s being checked by JSHint to continue on Grunt processes. 

It would be great if you accept this so I can easily apply new releases of your plugin on my project. o/