Simplify links logic