Added smtlib support
Fixed scope bug which ignored lower cardinalities