Refactored the code that renders device art images.