JS optimizations and apply jQuery-BEM