refactoring Gallery widget default HTML