Add post pre and local quantifier to env variales

also add a singular specifier to the variable
Make first autotest for jsonmod
Fix const correctness and some general cleanups