Cleanup and improve RepoLinker

Change-Id: Id302c4b8dcc8204bb164122a8fee5191ebf1f178