This is an extraordinarily large commit, and in hindsight would have benefitied from being written separately.
To summarise:
- Converts namespace URI parsing to a regex, instead of convoluted string logic
- Removes per-request XML structures in favor of normalised XPath queries
- Moves common variables for all requests to a k/v map of their name and contents, in order to reduce function parameter count
- Changes the name of the ECS action "NotifiedETicketsSynced" to its hardcoded (tenseless) name, "NotifyETicketsSynced"
- Improved properly reporting errors to the end user in areas