Refactor and documentation
Merge pull request #6 from lricoy/tests

Refactor and documentation