Made internal implementations more closely match TC implementations, updated TC api.