Fixed 404 issues when accessing private repos and repos user is a collaborator too
Some cleanup