Cleanups and documentation.