Refactoring and adding link status