Some minor performance improvements.