Refactor links