refactor: extract node, add tests to linkedlist