Create repositories. Refactor  base repository.