Extend close functionality, enable callbacks.