Working curator thread.  New functions and tests.