Took care of hanging threads, cleaned logs