Added Close() method.