various little speedups