Refactored linkresolver some more.