Gallery layout and other fixes