How do we do it?

How does our country strive for better vetting to stop terrorists from coming into this country by posing as refugees or overstaying their visas? At the end of the day, how do we do that? I think the media has totally overshawdoed the purpose/issue here. How do we secure our country more while still pleasing everyone? We have legitimate refugees who need our support, but we also have terrorist posing as refugees who have made it through our current vetting system. Let's leave our political views out for a second and debate about ways to improve our countries borders.