Refactor distcilib