Moved Angular controller logic to directive
Create directive for repo
Move repo activation logic to service