Re-organized typecheck and started typecheckexpr
Also many helpers and misc changes. I should commit more often!