Remove console log
Refactoring
Check for gallery inner instead of gallery when closing