threading issues reolved, cleanup implemented