sendfiles: refactoring (wip).