anchor.diff:      return
     end if
   
  +  if(allocated(scatter_genList)) then
  +    allocate(tmpGen(scatter_nGen+1))
  +    tmpGen(1:scatter_nGen) = scatter_genList(1:scatter_nGen)
  +    call move_alloc(tmpGen, scatter_genList)
  +    scatter_nGen = scatter_nGen + 1
  +  else
  +    allocate(scatter_genList(1))
  +    scatter_nGen = 1
  +  end if
  +
  +  allocate(fParams(nSplit-3))
  +  genName      = trim(lnSplit(2))
  +  genType      = -1
  +  crossSection = zero
  +  fParams(:)   = zero
  +
     ! Add a generator to the list
  -  scatter_nGENERATOR = scatter_nGENERATOR + 1
  -  call alloc(scatter_GENERATOR, scatter_nGENERATOR, 5, 0, "scatter_GENERATOR")
  +  ! scatter_nGen = scatter_nGen + 1
  +  call alloc(scatter_GENERATOR, scatter_nGen, 5, 0, "scatter_GENERATOR")
   
     ! Store the generator name
     scatter_ncData = scatter_ncData + 1
     call alloc(scatter_cData, mStrLen, scatter_ncData, str_dSpace, "scatter_cData")
   
  -  scatter_cData(scatter_ncData)           = lnSplit(2)
  -  scatter_GENERATOR(scatter_nGENERATOR,1) = scatter_ncData
  +  scatter_cData(scatter_ncData)     = lnSplit(2)
  +  scatter_GENERATOR(scatter_nGen,1) = scatter_ncData
   
     ! Check that the generator name is unique
  -  do ii=1,scatter_nGENERATOR-1
  -    if(trim(scatter_cData(scatter_GENERATOR(ii,1))) == lnSplit(2)) then
  -      write(lout,"(a)") "SCATTER> ERROR Generator name '"//lnSplit(2)//"' is not unique."
  +  do i=1,scatter_nGen-1
  +    if(scatter_genList(i)%genName == genName) then
  +      write(lout,"(a)") "SCATTER> ERROR Generator name '"//trim(genName)//"' is not unique."
         iErr = .true.
         return
       end if
  
positive.code:   select case (lnSplit(3)%get())
    case("ABSORBER")
  
      scatter_GENERATOR(scatter_nGENERATOR,2) = 1  ! Code for ABSORBER
  
    case("PPBEAMELASTIC")
  
      scatter_GENERATOR(scatter_nGENERATOR,2) = 10 ! Code for PPBEAMELASTIC
      if(nSplit < 8 .or. nSplit > 9) then
        write(lout,"(a)") "SCATTER> ERROR GEN PPBEAMELASTIC expected 8 or 9 arguments:"
        write(lout,"(a)") "SCATTER>       GEN name PPBEAMELASTIC a b1 b2 phi tmin (crossSection)"
        call prror(-1)
        iErr = .true.
        return
  
negative.code: 
      ! Request space to store the arguments
      tmpIdx = scatter_nfData + 1
      scatter_GENERATOR(scatter_nGen,3) = tmpIdx ! Parameters
      scatter_GENERATOR(scatter_nGen,4) = 0      ! CrossSection
      scatter_nfData = scatter_nfData + nSplit - 3
      call alloc(scatter_fData, scatter_nfData, zero, "scatter_fData")
  
  