Added the control parsing logic