Added latency and packet loss options and extracted network general behaviour.