repmgr3's repmgr.c file was not far off 10,000 lines - this will make it easier to manage individual parts of the code.