add document block
add collectRemotes method
Refactaring repository