Diatoms will go away on their own once the silicates are consumed from the sandbed and rock.
As for algae, there are lots of natural grazers in the hobby that won't require getting mollies that were switched over to saltwater...and thus shortening their lives.
For algae management, we have several articles in our articles section that discusses this as at the end of the day it is nutrient management that is the main cause. The algae is simply the identifier of something going on in the water column.
Basically, water changes. The solution is always dilution.