Gallery markup fixes