Numerous performance optimizations
Further optimizations