slight speedup
some cleanup