Corection of documenation

Function onstatechange was incorrectly documented as onchangestate
Merge pull request #11 from gazliddon/master

Corection of documenation