Cleaned up get_images and added get_number_of_images