Refactor loadAndInlineStyles()