more and better documentation and some reorganisation