Type inference, basic unifying of types, rewrite type variable stuff, type check calls and binary ops

Somehow it can infer stuff from calls. The code needs solid refactoring, but it's at least working in the base cases