Documentation and clean up