   opts.limit = 10
   
   fields = []
-  for column in columns
+  activeColumns = []
+  for column in allColumns
     if column.test?
-      fields.push column.sql if column.test opts
+      activeColumns.push column if column.test opts
     else
-      fields.push column.sql
+      activeColumns.push column
+  
+  fieldsSql = _.pluck activeColumns, "sql"
       
-  select = "SELECT " + (fields.join ", ")
+  select = "SELECT " + (fieldsSql.join ", ")
   from = "FROM playermatch p, tntmatch t"
   where = "WHERE t.matchid = p.matchid"
   limit = "LIMIT #{opts.limit}"

  }
]

applyColumnTemplates = (data) ->
  for column in columns
    if column.template?
      for row in data
        row[column.property] = column.template row[column.property]

    }
  ]

allColumns = [
  {
    title: "Match ID"
    property: "id"
