New version (now with extra performance and no console errors)