Add transformer getters and setters so its possible to expand variables

in the correct classes. There is some chains, but it was needed to get
the responsibillity of the classes correct

Also fix missing write call for a TreeWriter after refactoring