  We study the Liouville theory on a Riemann surface of genus g by means of
their associated Drinfeld--Sokolov linear systems. We discuss the cohomological
properties of the monodromies of these systems. We identify the space of
solutions of the equations of motion which are single--valued and local and
explicitly represent them in terms of Krichever--Novikov oscillators. Then we
discuss the operator structure of the quantum theory, in particular we
determine the quantum exchange algebras and find the quantum conditions for
univalence and locality. We show that we can extend the above discussion to
$sl_n$ Toda theories.
