Wrapping up first phase of optimizations