Network controller refactoring