More optimizations including some parallelism