Implemented deletion and some logging.