Fixing the threading method and adding some documentation

When in daemon situation, there were issues concerning the re init of
some program