Realigned JS files with jQuery style guide.
Merge pull request #3214 from pjackson28/alignwithjquerystyleguide

Realigned JS files with jQuery style guide.
vapour optimizations and tweaks