reworked ImageLibrary to use an object to store the images