Documentation
Fixing state naming changes and hooks.
Adjusting the example with the latest changes.
JSHint compliance