Implemented open, close, exit.