This is an unversioned interim commit with unfinalised code. The threading code establishes job queues. The code cleanup removes various _TopLevel functions pertaining to database operations.