Implemented close and delete actions.