print.revshare <- function(DT, ...) {
  colOrder <- 
  c("year", "month", "country", "product", 

  "PayIsNet", "PayIsGross", 
  "net_revenue", "gross_revenue", "payable", "OrchardRev.usingNet", "OrchardRev.usingGross",

  "revenue_share", 
  "total_tracks", "rightholders_tracks", 
  "pro_rata_share", "pro_rata_exact", 

  "payable_eur", "payable_usd", "currency"
  )

  colsUsing <- intersect(colOrder, names(DT))
  DT <- copy(DT)
  setattr(DT, "class", setdiff(class(DT), "revshare"))

  print(DT[, colsUsing, with=FALSE], ...)
}

'[.revshare' <- function(x, ...) {
# browser()
  sc <- sys.calls()
  ret <- data.table:::'[.data.table'(x, ...)
  classAppend_(ret, "revshare")

  if (any(grepl(":=", capture.output(tail(sc, 1)))))
    return(invisible(ret))
  return(ret)
}

classRemove_ <- function(x, classToRemove) { 
  setattr(x, "class", setdiff(class(x), classToRemove))
}

if (exists("DT.revshare") && inherits(DT.revshare, "revshare"))
  try(classRemove_(DT.revshare, "revshare"), quiet=TRUE)