Made networking into a library.