refacter typechecker into submodules for different AST componenets
fix array indexing tests