adding facility to define js dependencies
fixing syntax errors
fixing syntax error