TasksMod: javascript memory optimizations