Refactoring Router Software to Minimize Disruption