Move debug code from .html to debug.js, minor changes.
Changed readme.