small fixes in tev code
small fixes
more cleaning
small fix for robynasi problem: it seems that in his machine some invalid  commands are produced and they where detected as geometry commands causing the emulator to crash. merge some changes from master that detects those invalid commands and fix the problem.
the weird thing is that in my system those invalids commands are not generated.