Minor refactoring for console and network