deprecating. moved code to either functions or core