more speed optimizations
Merge branch 'master' into beta