Major cleanup of control.py!