Refactored repomanagers out of main.