Refactored linked list macros.