Voice Commands: refractored code