More speed optimizations