started refactoring of Repository, to reduce code duplication; refactored Statistic classes