Simplify some code.
Improve example and update version to 1.1.0.