"The madrassa system is almost entirely dependent on subsidies from Saudi Arabia, the United Arab Emirates and Libya." And HERE lies the real problem. Follow the money! I would bet that the Saudis actually provide the majority of the funds, with much smaller amounts from the UAE and Libya.
The only way to stop this is to take the Saudi oil fields. Without their blood money, they won't be able to support terrorism.