Add resource referencing processing including Gringott resource name translation, fix  error in Condition JSON output