Switched out recursive analysis to higher order foldDown  on AST
Installed typechecker and implemented some type checks

+ added tests framework for type checker
+ some tests