Cleanup Link code