Test links and refactor testing