Improve example.
Refactoring code.