Documentation and tidy