The complicating factor is all the people in Gaza (and the West Bank) are effectively stateless persons. They don't hold any citzenship with any UN Member state. Any time a Palestinian wants to travel anywhere that is not where they are, they need to first get a passport issued by the United Nations, and then a Visa issued by their destination county. En masse, there is nowhere for them to go, because none of the neighboring countries want to take them, or in the case of Lebanon, Syria and Egypt, grant them citizenship in their own countries.
Its kept the Palestinians in a weird international law purgatory, where everything from their health care to their schools is administered by a UN Agency. Pretty horrific. Israel for its part obviously doesn't want them, but they also can't get rid of them. And they also can't just enact a "final solution to the Palestinian Question". Well, at least until today anyway. Considering what just went down I don't doubt quite a few Israeli generals are arguing for a Purge that would make Stalin laugh nervously.