Changes to schema, making fields optional and added check to addInputLink and addOutputLink to ensure no duplicates are added.