Many changes

stats now query db for matches and events.