Some performance improvements.