End of network refactor