Add more tests to links and refactor whole test suite