Some small optimizations.