Fixing javascript lint errors