Refactor default and custom links merge.