Fixed the javascript API and added save state.
Merge branch 'master' of github.com:dsemi/web-ai