Adding ToR3 Python code, fixing small tech errors in Ruby