Fixing javascript formatting