Moved transform process into seperate file