Some refactoring for implementing separate transformers