Simplify a little getLink
little refactoring