Switched over to tasks that have completion handlers. This allows the main section of the program to assume that it is always running on the main thread (The tasks take care of creating and running the background threads)