Improve BTerminalIOHandler; fix BCodeEditor