Refactor rsync tranfers to new module, adapt web to use it