* fix syntax error and bugs.
* minor changes to code style
* use private reference variable instead of this keyword.(for minimal file size)
* use resultMode as Normal in multi-call mode.
Merge pull request #2 from dsonet/patch-1

bug fixes