Refactored Torch Controller.