typed VM ops and many type checker fixes