Refactored Torch Controller to define a protocol, also cleaned out cruft.