Link detection

Closes #5