When you have the base in the np here's what you do.
First, wash the non-polar with 5% NaOH a couple of times. That way, most water soluble impurities are washed away.
Then you extract the np layer with 10-15% HCl, about 5-10 times in weight of expected freebase.
That way you form the MDMA*hcl salt, and it goes in the water layer.
Then you wash the water layer with a little np fresh from the bottle. To make sure no np impurities were carried over.
Then you take your water layer and with strong NaOH(35% for example) you slowly bring the pH to 12-13. You will see the oil fall out, sometimes if very strong NaOH is used, or if you overbasify, the oil will start floating. Its brown and cant be missed.
You extract again with non-polar, then dry and gass.
So the making of the hcl salt is required to extract from the non-polar.