Moved transform functions into their own file