JS optimizations #13