scalable-background: Removing duplicated code