Implement type checking rules for decls
Implement renaming rules for vars and decls