Migrate to new preferences API (#133)