OK, there are ways to define the layer mask but for your problem, there's no need for that at the moment.
As I said before I made a selection of the black with the Quick selection Tool.
I then went to LAYER > LAYER MASK > REVEAL SELECTION
This added the selection to the layer mask.
My canvas looks like this....
It's at this point that You may have to make some minor adjustments to the mask with the Brush Tool.
Next I duplicated the layer with the layer mask.
Turn off the first layer masked layer. The one on the bottom!
Then right click on the layer mask of the second masked layer and choose "apply layer mask" from the menu.
You should now have this.
Now select the layer with the applied layer mask.
Go to LAYER > MATTING > DEFRINGE > Select 2 pixels and hit OK.
This should make fast work of the project and solve your BG remnant problem.