intro scopes to type checker
replace scope parameter with local scopes
remove scope in variable declaration
refactoring type checker