CHG: Updated thumbnail gallery for new init script. Small refactoring.