Refactor and comment doxument client
Refine handleTripReport flow