reafctorings based on new ResourceRegistry design