Modifying and examining linked lists