new function, bug fix

replaced incorrect use of function argument scoping (a:) with function local variable scoping (l:)

added a function which comments out JS functions