Improve popup gallery