Moved all chunk operations to worker thread, cleanup.