refactored StatsDatabase and VotesDatabase out of Database