Refactored thumbnails factory