Removing trailing whitespaces
Remove compiler warnings, graceful signal handler thread termination
Merge pull request #1 from isn-/master

minor tweakings