Improved JavaScript performance