merged scripts into galleries.py