A few extra optimizations.