Change class transformer to use hoisting