Documentation + better logging.