This is a semester project written by Arnaud Maret.