Reality Check: Your questions on sovereignty and laws
Many of you have contacted the BBC about sovereignty, laws and defence. We've answered some of your questions below.
It's difficult to quantify how much EU law comes from the EU; the BBC's Legal Correspondent Clive Coleman says estimates vary between 13% and 62%.
If the UK were to leave the EU, untangling itself from EU legislation would be a very complicated process indeed. The EU is involved in setting global standards in many fields, so the UK would still be bound by many rules if it left the EU.
The amount and cost of EU regulations were repeatedly mentioned throughout the campaign, with some suggesting they cost British businesses £600m a week. We've discovered that in recent years the number of new EU regulations has been below 2,500 every year. The cost figure excludes any benefits from the regulations and it is not clear how much of that money could be saved by leaving.
A further issue raised throughout the campaign was the relationship between the EU and UK VAT rates. EU rules mean the UK cannot reduce VAT on goods and services below 15%, the standard rate of VAT in the EU. The standard rate of VAT in the UK is 20%, so the government could reduce it by up to 5% today if it wanted. Some goods and services, like domestic fuel, are on a pre-approved list that are subject to lower VAT rates but the agreement of all other EU members would be required to reduce rates further.
In terms of sovereignty, the prospect of whether the UK would have to join an EU army also emerged during the campaign. We found that many European politicians want to see the creation of an EU army, but EU treaties are clear that it could be blocked by Britain.
Some queries we received were related to the British overseas territory of Gibraltar, which depends on the UK for its international relations. If the UK leaves the EU, so does Gibraltar. Gibraltar cannot reapply to join the EU on its own without being recognised as a sovereign state.
Below, you can find the answers to some specific questions that you've asked us.
The question: Tony Richardson asks BBC Radio 4's PM programme "If we decide to remain in the EU, does that give a green light to the European Commission on moving to ever closer union and ultimately lead to a federal Europe?"
The answer: "Ever closer union" is an EU aim and is enshrined in EU Treaties but David Cameron negotiated an exemption from it in the new settlement for the UK in the EU should the UK vote to remain. But the phrase "ever closer union" doesn't necessarily imply a move to a federal EU. The Treaty text refers to a union of peoples, not of member states. There was an attempt to replace it with the phrase "federal union", which failed.
"Ever closer union" isn't a legal basis for any increase of EU power although arguably it has been used by the European Court of Justice to justify its interpretation of laws.
The question: Adrin asks BBC Radio 4's PM programme "Would leaving require an Act of Parliament, and if so what would happen if members of Parliament in good conscience refused to vote for an enabling Bill to quit the EU?"
The answer: The path out of the EU, never taken since it was introduced, is technically Article 50 of the Lisbon Treaty.
As the Prime Minister said in the House of Commons:
"I want to spell out this point carefully, because it is important. If the British people vote to leave, there is only one way to bring that about, namely to trigger Article 50 of the treaties and begin the process of exit, and the British people would rightly expect that to start straight away."
Article 50 allows for two years of negotiations once a member state, in this case the UK, notifies the European Council of its intention to leave the EU. Negotiations between the UK and the EU would be conducted between the UK government and the European Commission acting under guidance from ministers from the other 27 EU countries.
Open Europe, the London-based think tank, looked at how Parliament might fit into this process. First, there is no obligation for the UK government to get consent from Parliament to begin the process of withdrawal through Article 50. There might be political reasons to involve Parliament - for example to get a mandate to negotiate a new deal rather than simply severing all ties - but it is not legally required.
If a deal is done then Parliament can reject it under the Constitutional Reform and Governance Act 2010. However, this only gives it the right to reject a deal - known as negative assent - it can't make any changes. It also doesn't stop us leaving under Article 50.
Then there is the European Union Act 2011. It says any treaty that amends or replaces the current EU treaties can only be approved by an Act of Parliament and a referendum. How this will play out in the event of a Brexit is unclear. Does the renegotiation replace the old deal? Does the upcoming EU referendum constitute a referendum on a new deal?
Can the new - and possibly most important - UK treaty with EU nations be agreed by government under the Constitutional Reform and Governance Act without going through Parliament in full? What other laws will need to be put in place to make the new deals a reality?
The point, though, is none of this stops the UK leaving.
Parliament has the power to shape the new deal with the EU, but once the government begins the leave process it looks like a Brexit would be only a matter of time under Article 50.
The article says that if no deal is done and the rest of the EU don't all agree to extend negotiations then all the EU treaties cease to apply after two years anyway, whatever Parliament does.
The question: Matty tweeted @bbcnewsbeat to ask "Do you think leaving Europe will affect relations with NATO?"
The answer: The North Atlantic Treaty Organization is a political and military alliance of European and North American countries. It's a separate institution from the EU and some of its more prominent members are non-EU countries - the US and Canada, for example. The UK's position on NATO as a "bedrock of the UK's defence" and "leading instrument" of national security is unlikely to change as a result of the referendum result.
However, some military figures have warned that an out vote could have a negative impact on NATO because it could "undermine the effectiveness of the alliance". Others have warned that closer military co-operation between EU states if we stay in undermines the effectiveness of NATO.
Keep your questions coming by email (firstname.lastname@example.org) or via Twitter @BBCRealityCheck and we'll answer as many as we can before 23 June.