Refactor Distributed a little bit