the brown bubbles are dinoflagilates. I believe (and someone can correct if I'm wrong) this is caused by high silicates in the water. Are you using Ro/Di???
One sign of low Mg levels is that you will have a hard time growing Chaeto, mangroves, micro and macro algaes... as they all uptake MG for their bio process.
if after confirming tests show low MG. you could just do several water changes as IO salt seems to be high in MG. You could also go to your local CVS and pick up pure epsum slat which is a pure Mg supplement. careful not to overdose here. Use randy's calculator to raise to desired levels.