Linked lists for keeping track of the images