refactroing of image and UI parts