Some small performance improvements.