bug fixing and small refactorings (see details)

# fixed bugs in Repository#sources() and Repository#sinks()
# moved RepositoryService out of spi package