gallery ul refactoring