Removed main thread based operation. To make main-thread calls pass `nil` into the parameter.