Move default gateway dependencies to factory class