Gallery logic change and add waterfal layout function