Add a close method