Small performance improvements