some formating fix
some changes in waththis.c. fix fail with watchthis
global variabels removed
variables renamed. some duplicat code removed
move some code in functions, some variables renamed
fix bug with diff