Second part of LEGION implementation; Little refactoring for network has been performed