Update depreciated preference method.
Clean format.