Initial formatting cleanup.
More code cleanup and better separation of html, js and css.