restructured eterm buffer handling, using queue, other stability fixes, logging improved