Fixed code, added "use strict" to many of the methods (thanks jslint).
Remove empty script tag.
Made "doc.html" more valid(?).
replaced ugly "Carriage Return"+"Line Feed" with only "Line Feed".