Add `close()` and `getData()` instance methods