speedups and cleanups
up