Refactored the documentation and the example