Contains changes to the link class to handle validity checking properly. Link unit test tweaked.