Fixed compilation errors by introducing PreferredOperator type class and changing transformOp a little bit