Fix #105: Improve documentation and add more logging.