fix problems shown up with 'strict'
now focus the terminal after the 'send' button is clicked. Other tweaks too