Code and examples for linked lists