Cleanups, docs, logging.