Added close method.