made thread a daemon and register stop() method with atexit; fixes #4