Documentation and clean-up