Background queue thread stuff.