Fix working and formatting
Convert to UTF-8
Move demo site javascript to its own file, add couple of comments
No need to specify script type as JS