Fix typecheck error when using mod operator

One of the operands was the result of an exp operator, which returns a double...

Issue #4 still not fixed.  Now there are no errors but output PDF is empty.
Forgot to put "not" when checking if an edge has been visited

Fixes #4