Ref debugging needs to handle \n possibilities.
Remove obsolete stuff.
update spec-data
Fix error where defining a local dfn hid all remote dfns with the same name.
Add a printjson function for debugging convenience.