Minor changes.

Fix orthographic erros and add a function to the javascript file to
display the result. DRY