Harmonic maps, gradient flows, and regularity