Merge with optimizations branch