Optimising the settings custom styles code so that we only ever use a single reference.