Use self for clearer references in Repository constructor
Add missing semicolons to repository.js
Remove unused 'edge' require
Introduce branch abstraction