Fixed test
Refactoring for proxy mode.
Refactor for Nodes with multiple destinations (branches).