First version

Functional version with tests and doc