JS efficiency and cleanup
Merge pull request #933 from darkwing/auto-update

JS efficiency and cleanup