Changed the gallery attachment method to event delegation. Refactored some variable names in the progress.