After years of debate, the House on Thursday voted to repeal key parts of the Affordable Care Act and replace them with new provisions.The vote, which President Donald Trump was planning to tout as a big victory, sends the Republican-sponsored bill to gut Obamacare to the Senate for consideration.But winning approval for the bill could be even more difficult in the Senate than it has been in the House, where Republican leaders struggled for nearly two months to wrangle enough votes in their caucus to secure its passage.The bill passed by a vote of 217 to 213. All 193 Democrats voting opposed the bill; they were joined by 20 Republicans voting  no. A lot of us have waited seven years to case this vote,  House Speaker Paul Ryan, R-Wis., said shortly before the voting began.  Many of us are here because we pledged to cast this vote: to repeal and replace Obamacare. This bill delivers the promises we have made to the American people,  Ryan said.House Majority Whip Steve Scalise, R-La., told MSNBC shortly before the vote began,  We were elected to do this. After the vote, protesters outside the Capitol building yelled,  Shame, shame!  at members of Congress walking down the front steps.  CNBCWashington Free Beacon   One of the amendments, introduced by Rep. Tom MacArthur (R., N.J.), co-chair of the Tuesday Group, allows states to obtain a waiver from federal standards such as essential health benefits and community rating rules. This measure gained the support of House Freedom Caucus members, who said it will significantly lower health costs, even if it does not fully repeal Obamacare. The MacArthur amendment will grant states the ability to repeal cost driving aspects of Obamacare left in place under the original AHCA,  said the House Freedom Caucus.  While the revised version still does not fully repeal Obamacare, we are prepared to support it to keep our promise to the American people to lower health care costs. Another amendment, introduced by Rep. Fred Upton (R., Mich.) adds $8 billion to the Patient and State Stability Fund, which helps reduce premiums and out-of-pocket costs. This amendment would provide additional funding, $8 billion over five years, to ensure a strong safety net and reduce premiums, or other out-of-pocket costs, for those with preexisting conditions,  said Upton.Following the amendment, White House press secretary Sean Spicer said that the White House supported the measure and that President Trump has been working to ensure that Americans have more affordable care. Overall the efforts that were made, and especially the effort this morning with congressmen Long and Upton, help bring more people into this effort and make it even a stronger bill, and ensure that Americans have a health care system that gets them the care that they need at a price that s affordable,  Spicer said. The president has been on the phone constantly,  Spicer said.  I think we have made this an unbelievable bill and an unbelievable replacement for Obamacare, which is failing, and that s what we ve sought to do from the beginning. 