Weierstrass points and moduli of curves