Fixed JS

added comments fixed declarations