Merged file adds, cleanup from v1.70 to facilitate moving functions to module files