[PLUGGABLE BACKEND] Initial refactor. (#23397)