A few optimizations.