silence a compiler warning
silence some compiler/valgrind warnings (ensure not accessing uninitialized variable)

fixed a minor leak
safety belts and fixes after testing with valgrind
minor fixes and restored the SIG_INT handler