Remove bug from darken unused Mask variables

darkening function is leaving variables in the workspace.

Update to use a function that will not leave variables in the workspace.