js performance improvements