more performance improvements; update JavaScript