refactoring struktury js/html