Added code doc. Logger used systematically.