refactoring, repositories, JSON