Gallery: minor refactoring for increased readability.
Gallery: added media queries that modifies the number of list columns.