Improve model cleanup