Refactor loadAndInlineCssLinks()