Implementation of a SingleLinkedList with tail and head