minor draw loop, save, and onmousedown optimizations