Update links.py

Same as with the desktops module. Broke one thing into other functions.