Add basic support for closing models.