Minor refactoring of network utility methods