Fixed major TODO problem by switching over to threads