UI changes

Moved the main function to the top. Changes to the html doc.
Merge branch 'ui'