Updated WTD code. Still need to format results and integrate with main pipeline code.