typecheck: more work
typecheck: handle collection subtyping
typecheck: Fixed instantiate to not rely on state