frontend: fix: make out transformer more side-effect free