Added close method to the interface.