Add structured data and if primitive
Add `and`, `or`, `xor`, `not` operators
Add missing clause for `Econstr`
Refactor a bit