Some love

Hello,

I've just linted the JS, declared variables. Not tested, but it should be okay :)