Direct link refactoring and bugfix