migrate from OC_Preferences to DI config object

Get rid of private stuff from core.