Updated tranformers.py from globals to passed in variables