Documentation and various cleanups.