Added comments in the js files and removed any lint errors