Cleanup of links, data structures