Cleaned up makeLinks function to make it easier to read. deleteLink still not working