the fact that they are legal is why they are called loopholes. If they were illegal it would be considered tax circumvention/evasion which is a crime. The Liberals backed off their measures because Paul Ryan - the GOP speaker took command of the tax reform ship over Trump and unlike Obamacare repeal and replace is going to pass his reform. US is going to have post card style tax returns for individuals (no need to pay an accountant, tax filer or use software anymore). Less brackets and deductions for a simpler system with uniform rates. US is cutting the corporate tax and deductions for both small business and major corporations and they may later go back to repealing Obamacare which would make them a major threat to steal Canadian jobs like never before especially during tense nafta re-negotiations. 
https://www.youtube.com/watch?v=03XuH1Vh0CY