Removed code repetition for links