Refactored NetworkService configuration to use listener instead of setvlet init method