single image gallery/ refactor to OOP JS