Added most of the things needed for new reference.json support...