v9.1 : Global code refactoring, new documentation and documentation tests

Replaced unit tests with doctests