Large cleanup of patch to have something more maintainable

XLogCompressBackupBlocks still needs to be corrected as it is crashing...
Still the basics look far better.