Refactor repo detail