Modified MainControls script.