Move code around to clean up the architecture. Start adding in sync
timeout functionality.