Create link function only once.