XNAT-2541: Cleanup variable naming in archiving code to clarify variable usage