layout and gallery improvements