Refactor the way we register transformers.