Speed optimizations 2