Working implementation of linked list for storing events