DRY out network access code