Add a bit documentation.
Refactor specs and implementation.