Moved networkEndIp calculation to the factory method