Fixing JS hint warnings