GK: further refactoring html