Refactor css.loadAndInlineCSSResourcesForRules()
Refactor parts of loadAndInlineCssLinks()