Doc typos.
Change clear to unregisterAll.
Optimise hidden classes later.
Add options parameter to setState with all the necessary logic changes, closes #13, #12.