Remove UI code from preferences API