made command and video handling modular