tidying
Now produce references as part of the documentation process
updated to generate new reference.json format