cleaning up

last minute optimizations as well.