Added code to autorrent.py.