Moved link structs and functions to a2_link.c/h