Text this: Stability Boundary Characterization and Power Quality Improvement for Distribution Networks