Break out network functions into their own file