Code cleanup and refactoring

Added block to NetworkUtility class for callback if IP address cant be
resolved