Move gadget linked-list into a separate file.