Improved JavaScript #1
Improved JavaScript #2