Added remove statements prior to adding links