Move stats to db