Improved JavaScript #4