Main Thread (Phase 2) and User Interface (Phase 1)