Added command handling.