Moved the javascript into the head section of the demo html page
Automated file formatting
newline removal