Move repo management to its own class