Optimizations for big speed ups.