Add better support for link functions.