updated link methods.
minor groovy refactoring.