cleanup, small speedups