Added debug option to log state changes and characters scanned to the console.

Added demo.html file with an example of using the plugin.
Improved the README file.