Refactor pull request for Repository Contents API into new interface as suggested by @haacked