anchor.diff:      integer, pointer :: all_hnfs(:,:,:), unq_hnfs(:,:,:), degeneracy_list(:)
       type(opList), pointer :: fixop(:)
       real(dp), pointer :: latts(:,:,:), d(:,:)
  -    real(dp) :: reduced_latt(3,3), norms(3)
  +    real(dp) :: reduced_latt(3,3), norms(3), inv_lat(3,3)
       integer :: temp_hnfs(3,3,100)
   
       LatDim = 3
       n_min = 2
       if (.not. present(n_)) then
  -       n_max = 100/size(basis,2)
  +       n_max = 100
       else
  -       n_max = n_/size(basis,2)
  +       n_max = n_
       end if
   
       if (.not. present(eps_)) then
  
positive.code:           if (count_i ==0) then
               count_i = count_i + 1
               max_rmin = this_rmin
               temp_hnfs(:,:,count_i) = unq_hnfs(:,:,j)
            else if (abs(this_rmin-max_rmin)<eps) then
               count_i = count_i + 1
               temp_hnfs(:,:,count_i) = unq_hnfs(:,:,j)             
            else if (this_rmin > max_rmin) then
               count_i = 1
               temp_hnfs = 0
               max_rmin = this_rmin
               temp_hnfs(:,:,count_i) = unq_hnfs(:,:,j)             
            end if
         end do
  
  
negative.code:   !!<summary>Lists the HNFs for the given symmetry group.</summary>
    !!<parameter name="A" regular="true">The parent lattice for the
    !!system.</parameter>
    !!<parameter name="n_" regular="true">The determinant of the desired
    !!HNF.</parameter>
    !!<parameter name="eps_" regular="true">The floating point
  