reafctorings based on new ResourceRegistry design and other core changes