refactoring of html-gui