move network code into its own folder