Remove redundant code from the link helpers.