fix var identifiers in terms
add support for a few more cases

* let statements that set new values for arguments
* return statements that return a value