First part of network refactoring.