Started work on scoping and type checking