removed useless thread, unused variables and imports (for real this time)