Changes to schema, making fields optional and added check to addInputLin...

...k and addOutputLink to ensure no duplicates are added.