The four remaining Republican candidates faced off in a debate hosted by CNN on Thursday night at the University of Miami.

This was the last time for the candidates to take the national debate stage before several states hold their primaries on Tuesday, which could be a critical day for the Republican field with primaries in Sen. Marco Rubio's home state of Florida and Gov. John Kasich's home state of Ohio.

The Republican presidential candidates took the opportunity to address several issues at stake in this year's election.

Trade

Kasich argued for a trade environment that would "stand up for the American worker" and balance the amount of imports and exports coming into and leaving the country.

Real estate mogul Donald Trump said he would use the rules and laws of business to his advantage in running the American economy.

Rubio came out in favor of lowering tariffs to bolster American exportation.

Texas Sen. Ted Cruz spoke in opposition to the Trans-Pacific Partnership, and he said the country needs to negotiate trade deals to protect American workers, lift regulations on American businesses and create a new plan to tax imports.

Immigration and American Jobs

When questioned about his support for increasing the H-1B visa program that made it possible to bring in foreign workers, such the ones who replaced 250 American tech workers in Orlando in 2014, Rubio explained his support for a program under which you have to prove that "you're not replacing Americans with foreign workers, and that you've tried to hire Americans."

He also expressed his concerns about how foreign workers are hired through consulting businesses.

"What I argue is that no consulting business such as that should be allowed to hoard up all of these visas, that the visas should only be available for companies to use directly hired workers and that we should be stricter in how we enforce it," the Fla. senator said.

Stephan Dinan of the Washington Times then questioned why Rubio is against the legalization of immigrants until borders are completely secured, but has not called for a pause on the H-1B program.

Rubio responded that he doesn't think it "takes a pause to enforce the law."

Kasich said the U.S. "ought to have a guest worker program, where people can come in, work, and go home," as well as a path to legalization, although "not to citizenship," for immigrants who have not committed crimes.

Trump explained that although he uses the H1B program in his businesses, it shouldn't exist because "it's unfair to our workers."

Cruz said the U.S. is bringing in too many low skilled workers, and he asked the audience to look on his website for a "very,very detailed immigration plan" that includes a wall, a border patrol that is triple the size, the barring of federal taxpayer funds to any city that defies federal immigration laws and the end of welfare benefits for illegal immigrants.

Rubio argued for the transition to a merit-based immigration system, including for those in the country on green cards.

Education and the Common Core

Trump said he wants "local education" instead of Common Core standards. He also hinted at Dr. Ben Carson's endorsement, as well as the potential for Carson to play a role in his administration, specifically on the education side, if he were to win the presidency.

After clarification from moderator Jake Tapper that Common Core standards are developed and voluntarily adopted by the states, Trump said that the system has been "taken over now by the bureaucrats in Washington."

Kasich called for state school boards to set education standards, and he called for vocational education to start in the seventh grade in an effort to prepare children for the "jobs of the 21st Century."

Cruz said that if he becomes president, he will not only abolish Common Core, but also the federal Dept. of Education, sending the power back to the states. He also said the U.S. needs to "expand school choice."

Social Security

Rubio said that in order to prevent Social Security, and the country, from going "bankrupt," the retirement age needs to be increased and benefits need to be distributed based on levels of personal wealth. When asked to clarify, the senator said the retirement age would continue to increase generationally.

Trump said he would do "everything within [his] power not to touch Social Security." "I want to make our country rich again so we can afford it," he said.

Rubio said Trump's solution doesn't "add up" to the amount necessary to save Social Security.

Cruz said benefits' growth rates need to match inflation rates and that younger workers need to put some of their Social Security taxes into personal accounts, despite criticism that this plan wouldn't be advisable in a volatile market.

"The less government, the more freedom. The fewer bureaucrats, the more prosperity," the Texas senator said.

Cruz and Trump argued over both of their respective abilities to stand up to federal power in Washington.

Kasich said his Social Security plan involved lowering benefits for the wealthy and providing full benefits to those in need.

Republican Party

Trump denied the allegation that he was at odds with the Republican Party. He said he shared the same views as most Republicans, except on issues of trade.

"If you don't tax certain products coming into this country from certain countries that are taking advantage of the United States and laughing at our stupidity, we're going to continue to lose businesses and we're going to continue to lose jobs," the real estate mogul said.

Cruz said Trump is right about the problems with international trade, but said his tariff solutions wouldn't work.

The Middle East

Trump stood by his comment that, "Islam hates us," alluding to a "tremendous hatred."

Tapper asked Rubio to respond to Trump's comment.

"The problem is, presidents can't just say anything they want. It has consequences, here and around the world," the senator said.

Rubio then praised the "friendly Muslims" that "look out for" Christian missionaries in predominantly Muslim countries, as well as the many Muslims who have served in the U.S. military.

Trump said he didn't want to be politically correct and discussed 9/11 and the "tremendous hatred" of "large portions of a group of people."

Rubio responded by saying that he doesn't want to be politically correct, he wants to be correct, meaning addressing the radicalization of some people of the Muslim faith.

"We're going to work with the Saudis. We're going to have to work with the Gulf kingdoms. We're going to have to work with the Egyptians to defeat, for example, ISIS," Rubio said.

Cruz said Trump's "incendiary" language doesn't match his policies.

"I don't think we need a commander-in-chief who is neutral between the Palestinian terrorists and one of our strongest allies in the world, the nation of Israel," the Texas senator said.

Trump countered this statement by saying, "there's nobody on this stage that's more pro-Israel than I am, OK," and he cited his family connections to the Jewish faith. He said that any neutrality on his part comes in the interest of negotiation. Trump, however, said he would have never made the recent Iranian nuclear deal.

"I will be so tough on them, and ultimately that deal will be broken unless they behave better than they've ever behaved in their lives, which is probably unlikely," Trump said.

Cruz also sided with Israel and against neutrality on Palestine.

Rubio called Trump's policy "anti-Israeli," and said that negotiations with the Palestinians were not possible at the moment because of the influence of Hamas.

Kasich said he doesn't believe there is any long-term permanent peace solution between Israelis and Palestinians. He said that the U.S. can work toward stability in the region by supporting the Israelis.

Syria and the Islamic State

Cruz said defeating the Islamic State starts by sending air power and arming Kurdish allies. Only after that can the U.S. send ground troops.

Kasich said a coalition between the U.S. and Arab and European nations is necessary, along with air and ground forces.

Trump said the the U.S. has "no choice" but to send more troops to fight the Islamic State

"We have to kick them out fast, and we have to get back home," Trump said.

Veterans

Rubio complimented Congress's bipartisan V.A. accountability law, acknowledging Vermont Sen. Bernie Sanders' involvement, which attempts to hold V.A. executives accountable for problems, but said that even with the law "no one's being held accountable."

Kasich said the V.A. needs to be downsized and spread out to adequately address the needs of veterans.

Cuba

Rubio, the son of Cuban immigrants, opposes the renewed engagement with Cuba and said that the U.S.'s relationship with Cuba should not change until the Cuban government changes.

"The only thing that's changed as a result of this opening is that now the Cuban government has more sources of money from which to build out their repressive apparatus and maintain themselves there permanently," Rubio said.

Trump spoke up in favor of making a good trade deal with Cuba.

Cruz, also of Cuban heritage, said he would break diplomatic ties with the country if he were elected.

Kasich said the U.S. needs to stand by its allies. "A strong America is what the entire world is begging for," the Ohio governor said.

Climate Change

Rubio said that the climate "has always been changing," and he said that laws should only be passed when it is changing because of something people are doing. The senator said that many climate change laws would be "devastating" to the economy with "zero" affect on the environment because it would drive businesses out of the country and relocate pollution elsewhere.

Kasich said he does believe humans contribute to climate change and that the way to address the problem is to pursue renewable sources of energy.

Global Attitudes

Cruz explained that he thinks the Obama Administration has weakened the U.S.'s global reputation. He, once again, said that he would end the Iranian nuclear deal because "America needs a president who stands with our friends and allies, as I will do, and who stands up and demonstrates strengths to our enemies."

Trump stood by his comments on Putin and people within the Chinese government.

Kasich condemned the Chinese government's role in the Tiananmen Square massacre, but said he doesn't believe that China should be made an enemy. Instead, he said, they should be a competitor, under the conditions that they work to end Kim Jong-un's reign in North Korea and understand that "they don't own the South China Sea."

Kasich also said he would take a more authoritative position on cyber attacks and that he would not allow China to "manipulate their currency."

Violence at Trump Rallies

When asked about some acts of violence against protesters that had transpired at his rallies, Trump said that he understands the aggressors' anger, but does not condone the violence.

Cruz said Washington's attitude needs to change.

"We need to nominate and elect a president who remembers he works for the people," the Texas senator said.

Kasich spoke on the necessity of unity in the country.

"You can either prey on that and be negative about it, or you can tell people that these things can be fixed," the Ohio governor said. "If we're Americans rather than Republicans and Democrats, we get together, we can solve all of these problems."

Rubio said that "leadership is about using the anger [at the country's institutions] to motivate us, not to define us…but to motivate us to take action."

A Contested Convention

Tapper asked Kasich about the possibility of a contested party convention, where the Ohio governor could potentially have a chance to win the nomination.

"Look, you have to earn the delegates in order to be picked, but let's not get ahead of ourselves," Kasich said. "We don't know what's going to happen because we still have about half the delegates to be selected."

Trump said that he thinks "whoever gets the most delegates should win."

Cruz said some politicians in the party are hoping for a contested convention in which they can "parachute in their favored Washington candidate to be the nominee." The Texas senator said only he and Trump have a chance at winning the nomination, based on their current delegate counts. Cruz asserted that if Trump wins the Republican nomination, Clinton will win the general election (assuming she wins the Democratic nomination).

Rubio said he has been disappointed recently by his inability to live up to his expectations in the polls, but he said his supporters keep him motivated.

Flexibility in Politics

Rubio said that flexibility on ideas is acceptable, but flexibility on principles is not. He referenced his bipartisan ideas on higher education costs and the VA Accountability Act, among others. There are many other areas, however, including Obamacare, tax policy and the size of the federal bureaucracy, on which the Florida senator said he would not take a bipartisan stance.

Trump said Washington needs a leader that can make deals.

Kasich cited his political accomplishments in Washington and Ohio as examples of using bipartisan principles to work toward goals.

Looking Ahead

This debate in Miami was the candidates' last chance to appeal to voters before primaries in Florida, Illinois, Missouri, North Carolina, and Ohio, which have a total 358 Republican delegates up for grabs.

Reach Staff Reporter Ali Main here; follow her on Twitter here.