Documentation and cleanup pass.