Optimizations

Some profiling results that make work faster