Add support for closing open models.