Interim commit of TC algorithm refactor.
Interim commit of TC algorithm refactor.