If you're concerned about the purity of your nation there's no need to be a stereotypical liberal about it either. Allow me to present a policy package that costs the state basically nothing and improves the lives of many not currently within the borders of your state.
1. Move from jus soli to jus sanguinus; no one without a parent who is a citizen of the state automatically becomes a citizen.
2. Any foreigner convicted of any crime gets deported. One may wish to have different visa categories for foreigners of a higher class/who have more money. The big thing is that it be clear that begging, petty theft and homelessness are deportable offences.
3. After five years you can either go home with all the money you paid in taxes/social security minus an actuarial average of your cost to the state or you can stay and forfeit it. South Korea does something roughly similar and it works pretty well at discouraging settlement.
If you're feeling really humanitarian you can allow third generation non-citizen residents over 30 an opportunity to naturalise.