neaten up code
simple singly linked list implementation