cleanup for typechecking APIs