merged in verifier rewrite, small bugs remain