Some small optimizations for speed.
More mini-optimizations.