Add link testing. Refactor tests.