Continued refactoring of layout, HTML cleanup, adjusted buttons and dialog boxes