Refactoring the image and picture classes