Added templates for linked and double linked lists