chore: merge all the backend cleanup code into main
This is a fairly big diff but has been well tested. All of the fixes being merged are documented in "Sprint 18 Backend Node.js Cleanup". Note that all of the changed in this MR have been cherry picked into the el-salvador branch.
Edited by David FORDEN