Significantly rework Optimize DSL