This is Arnaud Maret's MSc thesis.