Optimizations

some more optimizing