Now passing tokens instead of string to various handlers; partially expanded 'select' and 'send' commands