Refactor, add abstract factory pattern to TT tasks workflow