link part updates

DRYs up link
adds tha entry hooks
cleans up code