Refactor and replace out ts_driver stuff into