Minor performance improvements