Added networking and debug output.