Moved shared code (networking, etc) into its own library.