Refactoring and adding services to remove repos from controllers