Improve ternary object, allow nesting in condition
Fix ternary deep nested grouping