Improved threading. Removed concurrent queue