Finished refactor using linked list.