Refactoring for CreateImagesPanel