Some minor speedups.