Add methods to selftype for defs and vars
Add object to test nested typechecking
Work around syntax-e nesting syntax structure and add comments