numerous performance improvements