Added functionality for Gallery page