Simplify the logic to build a linked-list