Split out networking to separate class